package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.BookDao;
import service.BookService;
import vo.Book;

@Service
public class BookServiceImpl implements BookService {
	@Autowired
	private BookDao bd;
	@Override
	@Transactional
	public Book addBook(Book book) {
		
		return bd.addBook(book);
	}

	@Override
	@Transactional
	public void deleteBook(int id) {
		bd.deleteBook(id);

	}

	@Override
	@Transactional
	public List<Book> findAllBooks() {
		return bd.findAllBooks();
	}

}
